<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	<%@include file="/WEB-INF/common/taglibs.jsp"%>    
    <title>江苏龙芯梦兰科技股份有限公司-SMT生产管理系统</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="${ctx}resources/css/common.css" />
  </head>
  <script type="text/javascript">
  $(function(){
 		$("#requeireDate").datepick({dateFormat: 'yy-mm-dd'});
 		$("#startDate").datepick({dateFormat: 'yy-mm-dd'});
 		$("#endDate").datepick({dateFormat: 'yy-mm-dd'});
 	});
	function submitForm(){
		var orderNo = $("#orderNo").val();
		if(orderNo==""){
			alert("订单号不能为空!");
			$("#orderNo").focus();
			return false;
		}
		var productName = $("#productName").val();
		if(productName==""){
			alert("产品名称不能为空!");
			$("#productName").focus();
			return false;
		}
		var cpuNo = $("#cpuNo").val();
		if(cpuNo==""){
			alert("CPU编号不能为空!");
			$("#cpuNo").focus();
			return false;
		}
		var pmonVersion = $("#pmonVersion").val();
		if(pmonVersion==""){
			alert("PMON版本号不能为空!");
			$("#pmonVersion").focus();
			return false;
		}
		var systemName = $("#systemName").val();
		if(systemName==""){
			alert("系统名称不能为空!");
			$("#systemName").focus();
			return false;
		}
		var systemVersion = $("#systemVersion").val();
		if(systemVersion==""){
			alert("系统版本号不能为空!");
			$("#systemVersion").focus();
			return false;
		}
		var programVersion = $("#programVersion").val();
		if(programVersion==""){
			alert("程序版本号不能为空!");
			$("#programVersion").focus();
			return false;
		}
		var requeireDate = $("#requeireDate").val();
		if(requeireDate==""){
			alert("需求日期不能为空!");
			$("#requeireDate").focus();
			return false;
		}
		var startDate = $("#startDate").val();
		if(startDate==""){
			alert("开工日期不能为空!");
			$("#startDate").focus();
			return false;
		}
		var endDate = $("#endDate").val();
		if(endDate==""){
			alert("完工日期不能为空!");
			$("#endDate").focus();
			return false;
		}
		var icStartNo = $("#icStartNo").val();
		if(icStartNo==""){
			alert("电路板开始编号不能为空!");
			$("#icStartNo").focus();
			return false;
		}
		var icEndNo = $("#icEndNo").val();
		if(icEndNo==""){
			alert("电路板结束编号不能为空!");
			$("#icEndNo").focus();
			return false;
		}
		var finishedPartNo = $("#finishedPartNo").val();
		if(finishedPartNo==""){
			alert("成品料号不能为空!");
			$("#finishedPartNo").focus();
			return false;
		}
		var packsize = $("#packsize").val();
		if(packsize==""){
			alert("每箱包装数量不能为空!");
			$("#orderNo").focus();
			return false;
		}
		if(!/^[1-9]\d*$/.test(packsize)){
			alert("每箱包装数量只能输入数字!");
			$("#packsize").focus();
			return false;
		}
		
		$("#saveOrder").submit();
	}
  </script>
 <body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="6%" height="19" valign="bottom"><div align="center"><img src="${ctx}resources/images/tb.gif" width="14" height="14" /></div></td>
                <td width="94%" valign="bottom"><span class="STYLE1"> 订单管理基本信息列表</span></td>
              </tr>
            </table></td>
            <td></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
    	<form id="saveOrder" action="${ctx}order/saveOrder.htm" method="post">
    	<input type="hidden" width="100%" name="orderEntity.id" value="${model.id}"/>
	      <tr>
	        <td height="20">
	        	<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#fbfcfd" >
	            	<tr height="25">
	                	<td align="right"class="STYLE6" width="25%">订单号:&nbsp;</td>
	                    <td align="left" class="STYLE19" width="20%" ><input type="text" width="100%" id="orderNo" name="orderEntity.orderNo" value="${model.orderNo}"/></td>
	                    <td align="right" class="STYLE19" width="10%" >产品名称:&nbsp;</td>
	                    <td align="left" class="STYLE19" width="20%"><input type="text" width="100%" id="productName"  name="orderEntity.productName" value="${model.productName}"/></td>
	                    <td align="left" class="STYLE19" width="25%"></td>
	                </tr>
	             </table>
	             </td>
	         </tr>
	         <tr>
	        	<td height="20">
	        		<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#fbfcfd" >
	            		<tr height="25">
		                	<td align="right"class="STYLE6" width="25%">CPU编号:&nbsp;</td>
		                    <td align="left" class="STYLE19" width="20%" ><input type="text" width="100%" id="cpuNo"  name="orderEntity.cpuNo"  value="${model.cpuNo}"/></td>
		                    <td align="right" class="STYLE19" width="10%" >PMON版本号:&nbsp;</td>
		                    <td align="left" class="STYLE19" width="20%"><input type="text" width="100%" id="pmonVersion"  name="orderEntity.pmonVersion" value="${model.pmonVersion}"/></td>
		                    <td align="left" class="STYLE19" width="25%"></td>
	               		 </tr>
	            	 </table>
	             </td>
	         </tr>
	          <tr>
	        <td height="20">
	        	<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#fbfcfd" >
	            	<tr height="25">
	                	<td align="right"class="STYLE6" width="25%">系统名称:&nbsp;</td>
	                    <td align="left" class="STYLE19" width="20%" ><input type="text" width="100%" id="systemName"   name="orderEntity.systemName" value="${model.systemName}"/></td>
	                    <td align="right" class="STYLE19" width="10%" >系统版本:&nbsp;</td>
	                    <td align="left" class="STYLE19" width="20%"><input type="text" width="100%" id="systemVersion"  name="orderEntity.systemVersion" value="${model.systemVersion}"/></td>
	                    <td align="left" class="STYLE19" width="25%"></td>
	                </tr>
	             </table>
	             </td>
	         </tr>
	         <tr>
	        	<td height="20">
		        	<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#fbfcfd" >
			            	<tr height="25">
		                	<td align="right"class="STYLE6" width="25%">程序版本:&nbsp;</td>
		                    <td align="left" class="STYLE19" width="20%" ><input type="text" width="100%" id="programVersion" name="orderEntity.programVersion" value="${model.programVersion}" /></td>
		                    <td align="right" class="STYLE19" width="10%" >需求日期:&nbsp;</td>
		                    <td align="left" class="STYLE19" width="20%"><input type="text" width="100%" id="requeireDate" readonly="readonly" name="orderEntity.requireDate" value="<fmt:formatDate value='${model.requireDate}' pattern='yyyy-MM-dd'/>"/></td>
		                    <td align="left" class="STYLE19" width="25%"></td>
		                </tr>
		             </table>
	             </td>
	         </tr>
	         <tr>
	        	<td height="20">
		        	<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#fbfcfd" >
			            	<tr height="25">
		                	<td align="right"class="STYLE6" width="25%">开工日期:&nbsp;</td>
		                    <td align="left" class="STYLE19" width="20%" ><input type="text" width="100%" readonly="readonly" id="startDate" name="orderEntity.startDate" value="<fmt:formatDate value='${model.startDate}' pattern='yyyy-MM-dd'/>" /></td>
		                    <td align="right" class="STYLE19" width="10%" >完工日期:&nbsp;</td>
		                    <td align="left" class="STYLE19" width="20%"><input type="text" width="100%" readonly="readonly"  id="endDate"  name="orderEntity.endDate" value="<fmt:formatDate value='${model.endDate}' pattern='yyyy-MM-dd'/>"/></td>
		                    <td align="left" class="STYLE19" width="25%"></td>
		                </tr>
		             </table>
	             </td>
	         </tr>
	         <tr>
	        	<td height="20">
		        	<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#fbfcfd" >
			            	<tr height="25">
		                	<td align="right"class="STYLE6" width="25%">电路板开始编号:&nbsp;</td>
		                    <td align="left" class="STYLE19" width="20%" ><input type="text" width="100%" id="icStartNo" name="orderEntity.icStartNo"  value="${model.icStartNo}"/></td>
		                    <td align="right" class="STYLE19" width="10%" >电路板结束编号:&nbsp;</td>
		                    <td align="left" class="STYLE19" width="20%"><input type="text" width="100%" id="icEndNo"   name="orderEntity.icEndNo" value="${model.icEndNo}"/></td>
		                    <td align="left" class="STYLE19" width="25%"></td>
		                </tr>
		             </table>
	             </td>
	         </tr>
	         <tr>
	        	<td height="20">
		        	<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#fbfcfd" >
			            	<tr height="25">
		                	<td align="right"class="STYLE6" width="25%">成品料号:&nbsp;</td>
		                    <td align="left" class="STYLE19" width="20%" ><input type="text" width="100%" id="finishedPartNo" name="orderEntity.finishedPartNo"  value="${model.finishedPartNo}"/></td>
		                    <td align="right" class="STYLE19" width="10%" >每箱包装数量:&nbsp;</td>
		                    <td align="left" class="STYLE19" width="20%"><input type="text" width="100%" id="packsize" name="orderEntity.packsize" value="${model.packsize}"/></td>
		                    <td align="left" class="STYLE19" width="25%"></td>
		                </tr>
		             </table>
	             </td>
	         </tr>
	         </form>
	         <tr>
	         	<td>
			       	<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#ffffff">
				          <tr height="40">
			                   <td width="50%" align="right"><input type="image" src="${ctx}resources/images/dl_1.gif" onclick="submitForm()"/>&nbsp;</td>
			                   <td width="50%" align="left">&nbsp;<a href="${ctx}order/list.htm"><img src="${ctx}resources/images/dl_2.gif" style="border: 0px"/></a></td>
			               </tr>
		           </table>
		        </td>
	      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td height="30">&nbsp;</td>
  </tr>
</table>
</body>
</html>
